<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
/**
 * 控制器创建: php artisan make:controller Admin/GatewayWorkerController
 */
class GatewayWorkerController extends Controller
{
    /**
     * @启动
     */
    public function start(Request $request)
    {
        $info = ssh('start --d');
        return response()->json($info);
    }

    /**
     * @重启
     */
    public function reload(Request $request)
    {
        $info = ssh('reload');
        return response()->json($info);
    }

    /**
     * @停止
     */
    public function stop(Request $request)
    {
        $info = ssh('stop');
        return response()->json($info);
    }

    /**
     * @重启
     */
    public function status(Request $request)
    {
        $info = ssh('status');
        return response()->json($info);
    }
}
